import axios from 'axios'

const url = 'https://test.app.local'

export const sqlAgent = {
  login: (params) => {
    return axios({ url: `${url}/api/account/login`, methods: 'GET', params })
  },
  logout: () => {
    return axios.get(`${url}/api/account/logout`)
  },
  client: () => {
    return axios.get(`${url}/api/client/get`)
  },
  clientVersion: () => {
    return axios.get(`${url}/api/client/getVersion`)
  },
  updateStatus: (query) => {
    return axios.get(`${url}/api/task/updateStatus`, query)
  },
  logTypeSelect: () => {
    return axios.get(`${url}/api/record/logTypeSelect`)
  },
  getPage: (params) => {
    return axios({ url: `${url}/api/record/getPage`, methods: 'GET', params })
  },
  getVersionPage: (params) => {
    return axios({ url: `${url}/api/versionRecord/getPage`, methods: 'GET', params })
  },
  openBrowser:(params) => {
    return axios({ url: `${url}/api/client/openBrowser`, methods: 'GET', params })
  },
  savelog: () => {
    return axios.get(`${url}/api/client/saveLog`)
  }
}
